TECCountAvailableTextEncodings
Counts and returns the number of text encodings the Text Encoding Converter supports.
pascal OSStatus TECCountAvailableTextEncodings (ItemCount *numberEncodings);
numberEncodings
- A pointer to a value of type
ItemCount
. On output, this value indicates the number of currently supported text encodings.- function result
- A result code. See "Text Encoding Conversion Manager Result Codes" (page 42) for a list of possible values. If other than
noErr
, then one of the text conversion plug-ins encountered an error condition when polled by the Text Encoding Converter.DISCUSSION
TheTECCountAvailableTextEncodings
function counts and returns the number of text encodings that you can use to perform conversions based on the current configuration of the Text Encoding Converter. This number indicates what size array you must allocate in a parameter of the functionTECGetAvailableTextEncodings
(page 67). Therefore, you should call this function before you callTECGetAvailableTextEncodings
in order to accommodate the specifications for all of these text encodings.
TECCountAvailableTextEncodings
counts each instance of the same encoding. That is, if different conversion plug-ins support the same text encoding for any of the conversion processes they provide, this function includes each instance of the text encoding in its sum. Consequently, the same text encoding may be counted more than once. For example, the Japanese Encodings plug-in supports Mac OS Japanese, and so does the Unicode Encodings plug-in. However, since theTECGetAvailableTextEncodings
function does not return duplicate text encoding specifications,TECCountAvailableTextEncodings
may return a number greater than the number of array elements required.